﻿using System.Architecture;
using System.Collections.Generic;
using System.Composition;
using Microsoft.Practices.Prism.Regions;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace HDK.Demo.Pages
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    //[Shared]
    //[ExportView("Pages/HDKHUB", ViewState.Snapped, "HDK.HUB")]
    [ExportView("Pages/HDKHUB", "HDK.HUB", new string[] { "MainRegion" }, ViewState.Snapped)]
    public sealed partial class HDKHUBSnipped : HDK.UI.Controls.LayoutAwarePage, IPageView
    {
        public HDKHUBSnipped()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void Grid_DoubleTapped_1(object sender, DoubleTappedRoutedEventArgs e)
        {
            var rn = RegionManager.GetRegionName(this.Parent);
            var rm = RegionManager.GetRegionManager(this.Parent);
            rm.RequestNavigate(rn, "//Pages/GroupDetails");
        }



        public string Title
        {
            get { return "SNAPPED HUB"; }
        }
    }

}
